using System;
using System.ComponentModel;
using System.Web.UI;
using Microsoft.SharePoint.WebPartPages;
using PS.WebParts.Rollup;
//using Microsoft.Web.Design.Server;

namespace PS.WebParts
{
    [Designer("PS.WebParts.Rollup.Designers.CrossSiteDataSourceDesigner, PS.WebParts.Rollup.Designers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f4a26fd125a021e")]
    public class CrossSiteDataSource : RollUpDataSource
    {
        protected override ATabularDataSourceView CreateViewInstance()
        {
            return new CrossSiteDataView(base.Context, this, string.Empty);
        }

        [Obsolete, Bindable(false), Browsable(false), PersistenceMode(PersistenceMode.InnerProperty)]
        public string Where
        {
          set
          {
              base.Query = "<Where>" + value + "</Where>"; 
          }   
        }

        [FriendlyName("Content Type"), Description(""), Browsable(true), DefaultValue("")]
        public string ContentType
        {
            get
            {
                return ((CrossSiteDataView)DSView).ContentType;
            }
            set
            {
                ((CrossSiteDataView)DSView).ContentType = value;
            }
        }

    }
}
